Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODDocument


AcquireBaseDraft

Document Shell

The AcquireBaseDraft method returns a reference to the base draft of this document with its permissions set as specified.

ODDraft AcquireBaseDraft (in ODDraftPermissions perms);
perms
The target permissions for the draft. Valid values for perms are dependent on the container suite; the Bento container suite supports two values: read only (kODDPReadOnly) and exclusive read/write (kODDPExclusiveWrite).
return value
A reference to the base draft of this document.
DISCUSSION
This method returns a reference to the base draft for this document with its permissions set as specified in the perms parameter. If this document did not already have a base draft, this method creates, initializes, and stores the base draft.

The permissions specified by the perms parameter must be consistent with the ways in which other objects are currently accessing the base draft. The restrictions placed on the permissions depend on the container suite. With the Bento container suite, the permissions may be set to exclusive read/write (kODDPExclusiveWrite) if the base draft is the document's only draft and no other object already has access to the draft (either read only or exclusive read/write). The permissions may be set to read only (kODDPReadOnly) if no object has exclusive read/write access to the draft.

This method increments the reference count of the returned draft. When the caller has finished using that draft, it should call the draft's Release method.

EXCEPTIONS
kODErrInvalidPermissions
The base draft is not accessible with the specified permissions.
SEE ALSO
The ODDraftPermissions type (page 902).
The ODDocument::AcquireDraft method (page 136).
"Insert" on page 247 in OpenDoc Programmer's Guide.
"Creating a New Document" on page 291 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help